home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / freeware / pixeltoolbox / Setup.exe / Main / PixelToolbox.exe / PixelToolbox.dxr / Scripts_55_mouse script - manipulation functions.ls < prev    next >
Encoding:
Text File  |  2002-06-08  |  2.8 KB  |  101 lines

  1. property pMySprite, pMyMember, pMyMember2, pMyMember3
  2.  
  3. on beginSprite me
  4.   pMySprite = sprite(me.spriteNum)
  5.   pMyMember = pMySprite.memberNum
  6.   pMyMember2 = pMyMember - 1
  7.   pMyMember3 = pMyMember + 1
  8. end
  9.  
  10. on mouseEnter me
  11.   if sprite(1).pUndoTrigger = 0 then
  12.     pass()
  13.   else
  14.     set the memberNum of sprite pMySprite to pMyMember3
  15.     case the currentSpriteNum of
  16.       "38":
  17.         put "Copy the current image to clipboard. (Ctrl+C)" into field "status"
  18.       "43":
  19.         put "Fills the current image or selection with the background color. (Delete)" into field "status"
  20.       "49":
  21.         put "Rotate the image or selection 90 degrees. (Shift+Right Arrow)" into field "status"
  22.       "50":
  23.         put "Flip the image or selection horizontally. (Shift+Left Arrow)" into field "status"
  24.       "51":
  25.         put "Flip the image or selection vertically. (Shift+Down Arrow)" into field "status"
  26.       "52":
  27.         put "Nudge the image or selection to the left by 1 pixel. (Left Arrow)" into field "status"
  28.       "53":
  29.         put "Nudge the image or selection to the right by 1 pixel. (Right Arrow)" into field "status"
  30.       "54":
  31.         put "Nudge the image or selection up by 1 pixel. (Up Arrow)" into field "status"
  32.       "55":
  33.         put "Nudge the image or selection down by 1 pixel. (Down Arrow)" into field "status"
  34.       "56":
  35.         put "Mirror the left half of the image or selection. (Ctrl+Right Arrow)" into field "status"
  36.       "57":
  37.         put "Mirror the right half of the image or selection. (Ctrl+Left Arrow)" into field "status"
  38.       "58":
  39.         put "Mirror the top half of the image or selection. (Ctrl+Down Arrow)" into field "status"
  40.       "59":
  41.         put "Mirror the bottom half of the image or selection. (Ctrl+Up Arrow)" into field "status"
  42.     end case
  43.   end if
  44. end
  45.  
  46. on mouseLeave me
  47.   if sprite(1).pUndoTrigger = 0 then
  48.     pass()
  49.   else
  50.     set the memberNum of sprite pMySprite to pMyMember
  51.     put EMPTY into field "status"
  52.   end if
  53. end
  54.  
  55. on mouseDown me
  56.   if sprite(1).pUndoTrigger = 0 then
  57.     pass()
  58.   else
  59.     repeat while the mouseDown
  60.       set the memberNum of sprite pMySprite to pMyMember2
  61.       updateStage()
  62.     end repeat
  63.   end if
  64. end
  65.  
  66. on mouseUp me
  67.   if sprite(1).pUndoTrigger = 0 then
  68.     pass()
  69.   else
  70.     set the memberNum of sprite pMySprite to pMyMember3
  71.     case the currentSpriteNum of
  72.       "38":
  73.         copyCurrent()
  74.       "43":
  75.         clearCurrentImage()
  76.       "49":
  77.         rotate90Degrees()
  78.       "50":
  79.         flipHorizontal()
  80.       "51":
  81.         flipVertical()
  82.       "52":
  83.         nudgeLeft()
  84.       "53":
  85.         nudgeRight()
  86.       "54":
  87.         nudgeUp()
  88.       "55":
  89.         nudgeDown()
  90.       "56":
  91.         mirrorLtoR()
  92.       "57":
  93.         mirrorRtoL()
  94.       "58":
  95.         mirrorTtoB()
  96.       "59":
  97.         mirrorBtoT()
  98.     end case
  99.   end if
  100. end
  101.